<?php

use yii\helpers\Html;
?>

<header class="main-header">
    <nav class="navbar navbar-light top-nav bg-faded">
        <div class="container">				
            <ul class="nav navbar-nav ">
                <?php if (\Yii::$app->user->isGuest) :?>
                <li class="nav-item">
                    <a class="nav-link" href="/user/login">【登录】</a>
                </li>
                <?php else: ?>
                <li class="nav-item">
                    <a class="nav-link" href="/credit/my/index">您好： <?=Yii::$app->user->identity->username ?></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/site/logout">【登出】</a>
                </li>
                <li class="nav-item">
                    <span class="nav-link">|</span>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/credit/my/index">我的金币</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/qun/order/index">我的订单</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/qun/inviter/index">我的好友</a>
                </li>
                </li>
                <?php endif ?>
            </ul>
        </div>
    </nav>
    <div class="container">
        <div class="">
            <div class="col-lg-3 col-xs-6">
                <a href="/" class="logo"><?=Yii::$app->name ?></a>
            </div>
            
            <div class="col-lg-9  col-xs-6 mt20" id="bd-main-nav">
                <?=  yii\widgets\Menu::widget([
                    'items' => [
                        ['label' => '优惠券直播', 'url' => ['/taobao/quan/index']],
                    ],
                    'linkTemplate' => '<a href="{url}" class="nav-link">{label}</a>',
                    'options' => ['class' => 'nav nav-pills site-nav'],
                    'itemOptions' => ['class' => 'nav-item']
                ]);
                ?>
            </div>
            <div class="clearfix"></div>
        </div>

    </div>
</header>